<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>init (AtBat)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/at_bat.rb, line 11</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init</span>(<span class="ruby-identifier">element</span>, <span class="ruby-identifier">gid</span>)
    <span class="ruby-ivar">@xml_doc</span> = <span class="ruby-identifier">element</span>
        <span class="ruby-ivar">@gid</span> = <span class="ruby-identifier">gid</span>
        <span class="ruby-ivar">@num</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;num&quot;</span>]
        <span class="ruby-ivar">@b</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;b&quot;</span>]
        <span class="ruby-ivar">@s</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;s&quot;</span>]
        <span class="ruby-ivar">@o</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;o&quot;</span>]
        <span class="ruby-ivar">@batter_id</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;batter&quot;</span>]
        <span class="ruby-ivar">@stand</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;stand&quot;</span>]
        <span class="ruby-ivar">@b_height</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;b_height&quot;</span>]
        <span class="ruby-ivar">@pitcher_id</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;pitcher&quot;</span>]
        <span class="ruby-ivar">@p_throws</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;p_throws&quot;</span>]
        <span class="ruby-ivar">@des</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;des&quot;</span>]
        <span class="ruby-ivar">@event</span> = <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;event&quot;</span>]         
        <span class="ruby-identifier">set_pitches</span>(<span class="ruby-identifier">element</span>)
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>